/*
 * @Description: File Description
 * @Author: xiaoan.chen@bshg.com
 * @version: H3.0
 * @Date: 2023-03-27 17:54:01
 * @LastEditTime: 2023-03-28 14:00:34
 */
import { defineStore } from 'pinia'

export type State = {
  errorHint: boolean
  errorTxt: string
  toOtherMiniprogram: boolean // 跳转到别的小程序
  showAnnouncement: boolean //是否显示通知公告
  announcementContent: string //显示通知内容
  announcementTime: string //显示通知时间
  appId?: string //小程序appId
  bannerurl?: string //小程序跳转路径
  customText?: string //自定义文案
  okText?: string //确认文字
}
export type Getters = {}
export type Actions = {}

export const useLoadStore = defineStore<'loading', State, Getters, Actions>('loading', {
  state: () => ({
    errorHint: false,
    errorTxt: '',
    toOtherMiniprogram: false, // 跳转到别的小程序
    showAnnouncement: false, //是否显示通知公告
    announcementContent: '', //显示通知内容
    announcementTime: '', //显示通知时间
    appId: '',
    bannerurl: '',
    customText: '',
    okText: '',
  }),
  getters: {},
  actions: {},
})
